package com.zz.springrabbitmq.listener;

import com.zz.springrabbitmq.constant.Constants;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class FanoutListener {
    @RabbitListener(queues = Constants.FANOUT_QUEUE1)
    public void fanoutListener1(String message) {
        System.out.println("fanoutListener1:" + message);
    }

    @RabbitListener(queues = Constants.FANOUT_QUEUE2)
    public void fanoutListener2(String message) {
        System.out.println("fanoutListener2:" + message);
    }
}
